if __name__ == '__main__':
    x = int(input())
    if x < 0:
        print(False)
    if x >= 0:
        y = 0
        z = 0
        x_bak = x
        x_end = x
        while x > 0:
            x = x //10
            z = z +1

        for i in range(z-1,-1,-1):

            y = y + (x_bak % 10) * (10 ** i)
            x_bak = x_bak // 10

        print(y == x_end)